<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数默认值</title>
</head>
<body>
    <script>
        function fun1(a,b){
return a+b;
        }
        var c =fun1(12,22);
        console.log(c);
        function fun2(a=10,b=30){
            return a+b
        }
       let r= console.log(fun2(12,2));//14
        r=fun2(90)
        console.log(r);//120
        r=fun2();
        console.log(r);//40
        
    </script>
</body>
</html>